package com.air.cloud.demo;

import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: java类作用描述
 * @Author: yh
 * @CreateDate: 2018/2/26 16:09
 */
@RestController
@RequestMapping("/demo/")
@Data
@RefreshScope
public class DemoAPI {

    @Value("${from}")
    private String from;

    @GetMapping("hello")
    public String hello() {
        return from;
    }


}
